Post Web

As we advance further and further into the digital age, we become more and more dependant on technology to function. Even the most basic task will interact with millions of lines of code. Doctors, hospitals, public transport, restaurants, schools, universities, banking. All of it relies on the internet to function correctly. Given recent incidents such as the Crowd Strike outage, it is becoming increasingly important for our software to be reliable.

Most software is hard to write, unreliable, difficult to use, hard to fix and slow to respond. When something is fast, it’s easy to work with and when something is simple, it’s harder to break.

The current state of the Web

The current “Web” is none of these things.

The internet was originally developed to only show static content. As it rose in popularity this became a massive limitation. With static pages, there is no way to create online stores or social media sites.

Javascript was added in Netscape Navigator 2.0 to remove this limitation.

The problem is that the systems in place were not originally designed for the todays uses case. We duct-tape functionality onto older existing solutions to try to save time. And it works, at least up until a certain point.

Modern websites are some of the slowest, most complicated and unreliable pieces of sofware ever written. Trying to build a reliable piece of software with HTML, CSS and JavaScript is a monumental effort.

Moving forward

With hardware advancing at an incredible rate, it’s unclear if anyone will ever slow down and try to fix the techinal debt that has piled up for over the past 30 years. We are so reliant and dug into this system there is almost no hope at moving away from it.

Redesigning the web

In order to fix the problems with the current web, we need to redesign the browser and the technology around it.

The first step is to identify what does work and what doesn’t.

Fractured Languages

Currently the web relies on three seperate languages to create webpages. One of the main features of a JavaScript Framework is that it combines layout, logic and styling into a single language.

Instead the browser should support a single unified language that is designed specifically for user-interfaces, compressed file size and instant execution time.

The most important metric for webpage performance is not loading millions of items in a list, but the time it takes to load the page into a useable state. The amount of data sent over the internet is the largest factor in latency, so the langauge needs to be designed to be compressable and terse.

Reducing tokens

This is a basic example of a webpage that prints a message when the user clicks a link.

<!DOCTYPE html>
<html>
<head>
<style>
.div {
background-color: white;
font-size: 40px;
}
</style>
<script>
function handleClick(event) {
console.log("User clicked the link!");
}
</script>
</head>
<body>
<div>
<a href="https://www.google.com" onclick="handleClick(event)">Google</a>
</div>
</body>
</html>

This code could be represented in a simpler language as:

div(
link("Google", "https://www.google.com")
.clicked(|_| log!("User clicked the link!"))
).font_size(40).bg(WHITE)

Here the HTML version is 3x larger and this is only a basic example.

Caching

Fonts should be cached more by browsers, there should really be a public archive of font hashes which can be used, instead of downloading fonts multiple times, just compare the hashes. No need to download things multiple times.

This could be stored along side the equivalent of a DNS, since it would be so commonly accessed.

Commonly used images should also be cached by browsers, the user should be able to set a limit of the cache size and it should prioritize the most access images and fonts.

Time to live doesn’t make much sense when files are hashed. The should live forever or until a maximum cache size limit.

Better operating systems

Currently no new operating systems can be built because browser support is an essential component, because browsers are so complex it is extremely difficult to port one to a custom operating system.